package com.github.catvod.spider.merge;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.LinkedBlockingQueue;

/* loaded from: classes.dex */
public class Gr implements Za {
    boolean h = false;
    final Map<String, Aq> V0 = new HashMap();
    final LinkedBlockingQueue<UW> j = new LinkedBlockingQueue<>();

    public void I() {
        this.h = true;
    }

    public void V0() {
        this.V0.clear();
        this.j.clear();
    }

    @Override // com.github.catvod.spider.merge.Za
    public synchronized vn h(String str) {
        Aq aq;
        aq = this.V0.get(str);
        if (aq == null) {
            aq = new Aq(str, this.j, this.h);
            this.V0.put(str, aq);
        }
        return aq;
    }

    public LinkedBlockingQueue<UW> j() {
        return this.j;
    }

    public List<Aq> q() {
        return new ArrayList(this.V0.values());
    }
}
